package com.repeat.gateway.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum GatewayEnum {
    NOT_FOUND(404, "资源不存在"),
    BAD_GATEWAY(5001,  "网关错误"),
    TOO_MANY_REQUESTS(429, "请求过于频繁，请稍后再试"),
    SERVICE_UNAVAILABLE(503, "服务暂时不可用，请稍后再试！"),
    FORBIDDEN(403, "无权访问！"),
    // 认证与授权相关 (1000系列)
    INVALID_TOKEN(1001, "令牌无效"),
    EXPIRED_TOKEN(1002, "令牌过期"),
    REFRESH_TOKEN_INVALID(1003, "刷新令牌无效"),
    TOKEN_BLACKLISTED(1004, "令牌验证失败"),
    INSUFFICIENT_PERMISSIONS(1005, "权限不足"),
    ACCOUNT_LOCKED(1006, "账户已被锁定"),
    ACCOUNT_DISABLED(1007, "账户已被禁用"),
    LOGIN_FAILED(1008, "用户或者密码错误"),
    CAPTCHA_INVALID(1009, "验证码无效或已过期");
    private final int code;
    private final String msg;
}
